function jMedia_loadArtists(location){
  
  location = jMaps_getAbrev3FromAbrev2(location);
  
  var urlRequest =
    'http://api.jamendo.com/get2/' +
	  'album_id+album_name+album_url+album_image+artist_genre+' +
    'artist_id+artist_name+artist_url+artist_image+' +
    'location_city/' +
    'album/' +
    'json/' +	
    'artist_album+artist_location/' +
    '?n=50&' +
    'nshuffle=200&' +
    'order=rating_desc&' +
    'location_country=' + location;

  jPage_setLoading();
  
  $.ajax({  
	  url: urlRequest,  
	  dataType: 'json',
	  success: function(res){  
		  if(res.length == 0){
		    alert("Error 404 - 4rtists n0t found 4t this place :(");
		    return 0;
		  }
		  jPage_build(res);
    }		  
  });
}


function jMedia_saveAlbum(o) {
  if (!supportsLocalStorage()) { return false; }

  localStorage["id_" + o.album_id] = o.album_id;
  localStorage[o.album_id + "_album_image_"   + o.album_image]    = o.album_image;
  localStorage[o.album_id + "_album_name_"    + o.album_name]     = o.album_name;
  localStorage[o.album_id + "_artist_name_"   + o.artist_name]    = o.artist_name;
  localStorage[o.album_id + "_artist_genre_"  + o.artist_genre]   
  localStorage[o.album_id + "_location_city_" + o.location_city]  

  for (var i = 0; i < kNumPieces; i++) {
	  localStorage["halma.piece." + i + ".row"] = gPieces[i].row;
	  localStorage["halma.piece." + i + ".column"] = gPieces[i].column;
  }

  localStorage["halma.selectedpiece"] = gSelectedPieceIndex;
  localStorage["halma.selectedpiecehasmoved"] = gSelectedPieceHasMoved;
  localStorage["halma.movecount"] = gMoveCount;

  return true;
}

function jMedia_getShortUrl(album_id){
  var urlRequest =
    'http://api.bitly.com/v3/shorten?login=cassioso&apiKey=R_a8d8f2738a329c0b2118176cd167f7a0' +
    '&longUrl=http%3A%2F%2Fjammap.cassioso.com' +
    '%2F' +
    '%3F' +
    'album%3D' + album_id +
    '%26loc%3D' + loc.short_name +
    '&format=txt';

  return $.ajax({  
	  url: urlRequest,  
	  dataType: 'text',
	  async: false,
	  success: function(res){  
		  return res;
    }		  
  }).responseText;
}


